package pers.qianyu.month_202101.date_20210110;

/**
 * 371. 两整数之和
 * https://leetcode-cn.com/problems/sum-of-two-integers/
 *
 * @author mizzle rain
 * @date 2021-01-10 12:42
 */
public class GetSum {
    public int getSum(int a, int b) {
        if (b == 0) return a;
        int s = a ^ b, carry = (a & b) << 1;
        return getSum(s, carry);
    }
}
